package com.sky.context;

import com.sky.dto.UserThredDTO;

// 本地线程空间
public class BaseContext {

    public static final ThreadLocal<UserThredDTO> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(UserThredDTO UserThredDTO) {
        threadLocal.set(UserThredDTO);
    }

    public static UserThredDTO getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
